/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package terrain;
import com.jme3.terrain.heightmap.*;
import com.jme3.math.FastMath;
import java.nio.FloatBuffer;
/**
 *
 * @author Vemund Kvam
 * Simple class to enable fractal TerrainQuad.
 */
public class TerrainFractal extends AbstractHeightMap  {

    public static final int FORMAT_8BIT = 0;
    FloatBuffer buff;
    public TerrainFractal(FloatBuffer buff,float heightScale) {
        this.buff = buff;
        this.heightData = buff.array();
            for(int i=0;i<this.heightData.length;i++){
            this.heightData[i]*=heightScale;
            }        
        this.size = (int) FastMath.sqrt(heightData.length);
    }
    @Override
    public boolean load() {
        return true;
    }
}
